package com.hjw.service.impl;

import com.hjw.dao.OrderItemDao;
import com.hjw.entity.OrderItem;
import com.hjw.service.OrderItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Administrator
 * @创建时间：2025-04-21
 * @文件名称：satoken_sobuk - com.hjw.service.impl
 */
@Slf4j
@Service
public class OrderItemServiceImpl implements OrderItemService {
    @Autowired
    private OrderItemDao orderItemDao;
    @Autowired
    private RedisTemplate<String, OrderItem> redisTemplate;

    @Override
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.NESTED)
    public int add(OrderItem orderItem) {
        return orderItemDao.add(orderItem);
    }
}
